<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="${request.contextPath}/res/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${request.contextPath}/res/bootstrap/css/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="${request.contextPath}/res/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="${request.contextPath}/res/easyui/themes/icon.css">
<script type="text/javascript" src="${request.contextPath}/res/easyui/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/res/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/res/js/book.js"></script>
<script type="text/javascript" src="${request.contextPath}/res/easyui/datagrid-detailview.js"></script>
<script type="text/javascript" src="${request.contextPath}/res/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
function search(value,name){
	$("#tab").datagrid({url:"/library-mannager/booksearch/"+name+"/"+value+".html"});
}
</script>
</head>
<body>
	<iframe width="0" height="0" name="actionframe"></iframe>
	<table id="tab" toolbar ="#tb" class="easyui-datagrid" style="width:auto;height:auto;">
		<thead>    
       		<tr>
            	<th field="bookId" align="center" hidden=true>图书ID</th>
		    	<th field="bookName" align="center" width="150">图书名称</th>
		    	<th field="bookAuthor" width="150" align="center">图书作者</th>
		    	<th field="bookPublish" width="150" align="center">出版商</th>
		    	<th field="bookDate" width="150" align="center">出版日期</th>
		    	<th field="bookSummary" hidden=true>摘要</th>
		    	<th field="bookType" width="150" align="center">类别</th>
		    	<th field="bookNumber" width="150" align="center">在库数量</th>
		    	<th field="managerName" width="150" align="center">负责人</th>
		    	<th field="bookImg" hidden=true>图书图片</th>
       		</tr>    
		</thead>
	</table>
	<!--菜单栏-->
	<div id ="tb">
		<a href="#" id="btnAdd" class="easyui-linkbutton" iconCls="icon-add" plain="true">增加</a>
		<a href="#" id="btnDel" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>  
		<a href="#" id="btnUpdate" class="easyui-linkbutton" iconCls="icon-redo" plain="true">修改</a>
			查询相关书籍:
     		<input id="txtTitle" class="easyui-searchbox"  searcher="search" prompt="输入查询值" menu="#mm" style="width:230px"></input>  
			<div id="mm" style="width:150px">  
   				 <div name="bookName" ">图书名称</div>  
    			<div name="bookAuthor">图书作者</div>
    			<div name="bookPublish">出版商</div>
    			<div name="bookType">图书类别</div>
    			<div name="bookDate">出版日期</div>
			</div>
	</div>
	<div id="window" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  		<div class="modal-header">
    		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    		<h3>图书信息</h3>
  		</div>
  		<div class="modal-body" style="margin:0px auto;">
    			<p>书籍编号：<input type="text" placeholder="bookID" required="true" data-provide="typeahead" class="book"></p>
				<p>书籍名称：<input type="text" placeholder="bookName" required="true" data-provide="typeahead" class="book"></p>
				<p>书籍作者：<input type="text" placeholder="bookAuthor" required="true" data-provide="typeahead" class="book"></p>
				<p>书籍版商：<input type="text" placeholder="bookPublish" required="true" data-provide="typeahead"class="book"></p>
				<p>书籍日期：<input type="text" placeholder="bookDate" required="true" data-options="formatter:myformatter,parser:myparser" data-provide="typeahead" class="easyui-datebox book"></p>
				<p>书籍类别：
				<select class ="book">
					 <option value ="计算机">计算机</option>
  					<option value ="数学">数学</option>
  					<option value="电子技术">电子技术</option>
  					<option value="英语">英语</option>
				</select>
				<!--<input type="text" placeholder="bookType" required="true" data-provide="typeahead" class="book">--></p>
				<p>书籍数量：<input type="text" placeholder="bookNumber"  data-options="min:1,max:1000" data-provide="typeahead" class="easyui-numberbox book"></p>
				<p>书籍摘要：<br/><textarea placeholder="bookSummary" required="true" data-provide="typeahead" class="book" style="height:200px;width:255px;"></textarea></p>
				<form id = "from" action="${request.contextPath}/upload.action" target="actionframe" method="post" enctype="multipart/form-data">
					书籍图片:<input type="file" name="image">
					<input type="submit" value="上传" />
				</form>
				<br/>
				<p id="message" style="color:red;"></p>
  		</div>
  		<div class="modal-footer">
    		<a class="easyui-linkbutton"  id ="btnSave" icon="icon-save">保存</a>
			<a class="easyui-linkbutton"  id="btnCancel" icon="icon-cancel">取消</a>
  		</div>
</div>
	
</body>
</html>